package com.design.cjm.test;

/**
 * 静态内部类实现单例
 *
 * @Author: Jie Ming Chen
 * @Date: 2019-02-21
 * @Version 1.0
 */
public class SingletonClass {

    private SingletonClass() {

    }

    private static class SingletonHolder {
        private static final SingletonClass singletonClass = new SingletonClass();
    }

    public static SingletonClass getInstance() {
        return SingletonHolder.singletonClass;
    }
}
